<section [formGroup]="clearAlarmConfigForm" fxLayout="column">
  <label translate class="tb-title no-padding">tb.rulenode.alarm-details-builder</label>
  <tb-js-func #jsFuncComponent
              formControlName="alarmDetailsBuildJs"
              functionName="Details"
              [functionArgs]="['msg', 'metadata', 'msgType']"
              noValidate="true">
  </tb-js-func>
  <div fxLayout="row" style="padding-bottom: 16px;">
    <button mat-button mat-raised-button color="primary" (click)="testScript()">
      {{ 'tb.rulenode.test-details-function' | translate }}
    </button>
  </div>
  <mat-form-field class="mat-block" style="padding-bottom: 16px;">
    <mat-label translate>tb.rulenode.alarm-type</mat-label>
    <input required matInput formControlName="alarmType">
    <mat-error *ngIf="clearAlarmConfigForm.get('alarmType').hasError('required')">
      {{ 'tb.rulenode.alarm-type-required' | translate }}
    </mat-error>
    <mat-hint [innerHTML]="'tb.rulenode.general-pattern-hint' | translate | safeHtml"></mat-hint>
  </mat-form-field>
</section>
